API Documentation
Public Member Functions | Friends | List of all members
nkResources::LogManager Class Referencefinal

The log manager class attached to this component. More...

Inheritance diagram for nkResources::LogManager:

Public Member Functions

 LogManager ()
 
 ~LogManager ()
 
void setReceiver (nkLog::Logger *receiver)
 
nkLog::LoggergetReceiver () const
 
void log (const std::string_view &message, const std::string_view &className)
 

Friends

class nkCommon::SingletonClass< LogManager >
 

Detailed Description

The log manager class attached to this component.

If any part of the component has to notify the user about something, it will do so by calling this class. By setting a Logger, the user is able to reroute those messages to wherever it is suitable.

Constructor & Destructor Documentation

◆ LogManager()

nkResources::LogManager::LogManager ( )

Constructor.

◆ ~LogManager()

nkResources::LogManager::~LogManager ( )

Destructor.

Member Function Documentation

◆ setReceiver()

void nkResources::LogManager::setReceiver ( nkLog::Logger receiver)

Sets the logger active for this component's log manager.

Parameters
receiverThe logger that will be used to dispatch messages logged by this component.

◆ getReceiver()

nkLog::Logger* nkResources::LogManager::getReceiver ( ) const
Returns
The logger currently attached to this component's log manager.

◆ log()

void nkResources::LogManager::log ( const std::string_view &  message,
const std::string_view &  className 
)

Logs a message and dispatches it to the attached receiver.

Parameters
messageThe message to log.
classNameThe class calling this function, or any contextual information helping to localize the logged message.

The documentation for this class was generated from the following file: